﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI.WebControls;

namespace RssReader.Core.UI
{
	public class LoginControl : BaseControl
	{
		#region Private Properties
		private TextBox _tbUsername;
		private TextBox _tbPassword;
		private LinkButton _lbSubmit;
		#endregion

		#region Public Properties

		#endregion

		#region Constructors

		#endregion

		#region Private Methods
		protected override void AttachChildControls()
		{
			_tbUsername = this.FindControl("tbUsername") as TextBox;
			_tbPassword = this.FindControl("tbPassword") as TextBox;
			_lbSubmit = this.FindControl("lbSubmit") as LinkButton;

			if (_lbSubmit != null)
			{
				_lbSubmit.Click += new EventHandler(_lbSubmit_Click);
			}
		}

		protected void _lbSubmit_Click(object sender, EventArgs e)
		{
			CheckLogin();
		}

		private void CheckLogin()
		{
			this.ThrowError("test message");
		}
		#endregion

		#region Public Methods

		#endregion
	}
}
